{% extends "base.html" %}

{% block content %}

<div class="row">
	<div class="span12 columns">
		<h1>Tell us more!</h1>
	</div>
</div>

<div class="row">
	<div class="span6 columns">

		{% if form %}
		<form enctype="multipart/form-data" method="post" action="">
			{% csrf_token %}
			<fieldset>
				<legend>{{ user.username }}'s Review</legend>
				
				<div class="clearfix">	
					<label for="id_img">Upload a photo</label>
					<div class="input">
						<input class="input-file" type="file" name="img" id="id_img" />
					</div>
				</div>
				
				<div class="clearfix">
					<label for="id_text">
						{% if rating == "good" %}
							What did you like about the
						{% endif %}

						{% if rating == "bad" %}
							What did you dislike about the
						{% endif %}

						<a href="/d/{{ dish.slug }}">{{ dish.name }}</a> at
						<a href="/p/{{ dish.place.slug }}">{{ dish.place.name }}</a>?
					</label>
					<div class="input">
						<textarea id="id_text" class="xxlarge" rows=10 name="text">{{ reviewText }}</textarea>
					</div>
				</div>
		
				<div class="actions">
					<input type="submit" value="Submit" class="btn primary"/>&nbsp;<button type="reset" class="btn">Cancel</button>
				</div>
			</fieldset>
		</form>
		{% endif %}
	</div>
</div>
{% endblock %}